import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";
import { getToken } from '@/utils/auth'
// 视频上下架
export function videoEdit(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/video',
    method: 'put',
    data: data
  })
}

//章节编辑
export function courseDelete(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'course/' + id,
    method: 'DELETE',
  })
}

//章节编辑
export function editSave(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'chapter/',
    method: 'put',
    data: data
  })
}

//视频删除
export function videoDel(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'video/' + id,
    method: 'delete',
  })
}

//解析视频删除
export function analysisVideoDel(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'parse/video/' + id,
    method: 'delete',
  })
}

//公开课视频删除
export function openVideoDel(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'video/public/' + id,
    method: 'delete',
  })
}

//视频新增
export function videoAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'video',
    method: 'post',
    data: data
  })
}

//视频详情
export function videoDetailInfo(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'video/' + data,
    method: 'get',
  })
}

//解析视频新增
export function analysisVideoAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'parse/video',
    method: 'post',
    data: data
  })
}

//公开课视频新增
export function openVideoAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'video/public',
    method: 'post',
    data: data
  })
}

//视频列表
export function videoList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'video/list',
    method: 'get',
    params: data
  })
}

//解析视频列表
export function analysisVideoList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'parse/video/list',
    method: 'get',
    params: data
  })
}

//公开课列表
export function openVideoList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'video/public/list',
    method: 'get',
    params: data
  })
}

//票据删除
export function billDel(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'bill/' + id,
    method: 'DELETE',
  })
}

//班级删除
export function classDel(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'class/' + id,
    method: 'DELETE',
  })
}

//学员删除
export function studentDel(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'student/' + id,
    method: 'DELETE',
  })
}

//学员导出
export function studentExport(data) {
  return request({
    url: 'student/export',
    method: 'get',
    params: data
  })
  // return request({
  //   headers: {
  //     // 'Content-Type': 'application/json',
  //     'Authorization': getToken()
  //   },
  //   url: 'student/export',
  //   method: 'get',
  //   responseType: 'blob',
  //   params: data
  // })
}

//答题详情
export function answerDetail(id) {
  return request({
    headers: {
      // 'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'system/answer/preview/' + id,
    method: 'get',
  })
}

//答题列表
export function getAnswerList(data) {
  return request({
    headers: {
      // 'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'system/answer/list',
    method: 'get',
    params: data
  })
}

//密码重置
export function resetPwd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'system/user/resetPwd',
    method: 'put',
    data: data
  })
}

//票据列表
export function billList(data) {
  return request({
    headers: {
      // 'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'bill/list',
    method: 'get',
    params: data
  })
}

//题库预览
export function chapterPreview(id) {
  return request({
    headers: {
      // 'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'chapter/preview/' + id,
    method: 'get',
  })
}

//班级修改
export function classEdit(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class',
    method: 'put',
    data: data
  })
}

//学员删除
export function delStudents(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class/delStudents',
    method: 'post',
    data: data
  })
}

// 班级新增学员
export function addStudents(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class/addStudents',
    method: 'post',
    data: data
  })
}

// 班级详情
export function classDetail(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class/' + id,
    method: 'get',
  })
}

// 课程新增
export function courseAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'course',
    method: 'post',
    data: data
  })
}

// 班级新增
export function classAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class',
    method: 'post',
    data: data
  })
}

// 班级列表
export function classList(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'class/list',
    method: 'get',
    params: data
  })
}

// 学员启用
export function studentOpen(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'student/start/' + id,
    method: 'put',
  })
}

// 学员停用
export function studentStop(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'student/stop/' + id,
    method: 'put',
  })
}


// 小程序解绑
export function unBind(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'student/unBind/' + id,
    method: 'put',
  })
}

// 学员编辑
export function studentEdit(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'student',
    method: 'put',
    data: data
  })
}

// 学员详情
export function studentDetail(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'student/' + id,
    method: 'get'
  })
}


// 问题删除
export function questionDel(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'problem/' + id,
    method: 'delete'
  })
}

// 学员新增
export function studentAdd(data, isToken) {
  if (isToken) {
    return request({
      headers: {
        'Content-Type': 'application/json',
        'Authorization': getToken()
      },
      url: 'student',
      method: 'post',
      data: data
    })
  } else {
    return request({
      headers: {
        'Content-Type': 'application/json',
      },
      url: 'student',
      method: 'post',
      data: data
    })
  }
}

// 课程列表
export function courseList(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'course/list',
    method: 'get'
  })
}

// 学员列表
export function getStudentList(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'student/list',
    method: 'get',
    params: data
  })
}

// 章节题目类型查询
export function chapterTypeNum(id) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'chapter/getType/' + id,
    method: 'get',
  })
}

// 试卷模板上传
export function testImport(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'test/import',
    method: 'post',
    data: data
  })
}

// 试卷修改
export function testEdit(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/test/',
    method: 'put',
    data: data
  })
}

// 试卷详情
export function getTestDetail(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/test/' + id,
    method: 'get'
  })
}

// 试卷预览
export function getPreview(id) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/test/preview/' + id,
    method: 'get'
  })
}

// 试卷提交
export function testSubmit(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/test',
    method: 'post',
    data: data
  })
}

// 试卷删除
export function testDelete(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test/' + data,
    method: 'delete',
  })
}

// 试卷类型删除
export function testTypeDelete(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test/type/' + data,
    method: 'delete',
  })
}

// 试卷列表
export function getTestList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test',
    method: 'get',
    params: data
  })
}

// 试卷类型列表
export function getTypeList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test/type/list',
    method: 'get',
    params: data
  })
}

// 试卷类型新增
export function addTypeList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test/type',
    method: 'post',
    data: data
  })
}

//试卷类型修改
export function editTypeList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/test/type',
    method: 'put',
    data: data
  })
}

// 题库模板下载
export function downLoadC(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/question/export',
    method: 'get',
    responseType: 'blob',
    params: data
  })
}

//章节模板上传
export function upLoadExampel(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'template/import',
    method: 'post',
    data: data
  })
}

//学员模板导入
export function studentImport(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': getToken()
    },
    url: 'student/import',
    method: 'post',
    data: data
  })
}

// 题库下架
export function chapterDelete(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/chapter/delete/' + id,
    method: 'post'
  })
}

// 题库下架
export function chapterUp(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/chapter/up/' + id,
    method: 'post'
  })
}

// 题库下架
export function chapterDown(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/chapter/down/' + id,
    method: 'post'
  })
}

// 题库列表
export function chapterLIst(id) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/chapter/getChapterByCourseId/' + id,
    method: 'get'
  })
}

// 新增题库
export function creatChapter(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: '/chapter/save',
    method: 'post',
    data: data
  })
}

// 题库模板下载
export function downLoadQ(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/template/export',
    method: 'get',
    responseType: 'blob',
    params: data
  })
}

//企业信息修改
export function comUpdate(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'company/update',
    method: 'post',
    data: data
  })
}

//银企对接数据导出
export function outListExport(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/finance/export',
    method: 'get',
    params: data
  })
}

//企业信息详情
export function comEdit(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'company/' + data,
    method: 'get',
  })
}

//企业信息删除
export function comDelete(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'company/delete/' + data,
    method: 'post',
  })
}

//企业信息导出
export function outExport(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'company/export',
    method: 'get',
    params: data
  })
}

//企业信息列表
export function companyList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'company',
    method: 'get',
    params: data
  })
}

//归属部门列表
export function department() {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'department',
    method: 'get',
  })
}

//信易贷工作情况统计表
export function einfoList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/creditLoan/list',
    method: 'get',
    params: data
  })
}

//明细导出
export function outDetail(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/detail/export',
    method: 'get',
    params: data
  })
}

//区域列表
export function areaList(data) {
  return request({
    url: 'cityDistrict',
    method: 'get',
  })
}

//banner删除
export function bannerDel(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'banner/delete/' + data,
    method: 'post',
  })
}

//banner列表
export function bannerList(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'banner',
    method: 'get',
    data: data
  })
}

//banner新增
export function bannerAdd(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'banner/add',
    method: 'post',
    data: data
  })
}

//关于我们修改
export function aboutUpdate(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      'Authorization': getToken()
    },
    url: 'aboutUs/update',
    method: 'post',
    data: data
  })
}

//银企对接会报表
export function aboutUs() {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'aboutUs',
    method: 'get',
  })
}

//银企对接会报表
export function financeList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/finance/list',
    method: 'get',
    params: data
  })
}

//企业注册数据合计
export function totalList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/register/list',
    method: 'get',
    params: data
  })
}

//企业注册数据明细
export function detailList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/detail/list',
    method: 'get',
    params: data
  })
}

//平台对接统计报表
export function demandList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'report/demand/list',
    method: 'get',
    params: data
  })
}
// export function demandList() {
//   return request({
//     headers: {
//       'Content-Type': 'application/x-www-form-urlencoded',
//       'Authorization': getToken()
//     },
//     url: 'afterloan/warn-signal/list',
//     method: 'get',
//   })
// }

//授信信息列表
export function insertApproveInfo(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApproveInfo/insertApproveInfo',
    method: 'post',
    data: data
  })
}

//信用报告
export function creditReport(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'platform-biz/common/credit-report/' + data,
    method: 'get',
  })
}

//预警详情预警列表


//预警信息详情
export function warnSignalDetail(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'afterloan/warn-signal/' + data,
    method: 'get',
  })
}

//预警信息列表
export function warnSignalList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'afterloan/warn-signal/list',
    method: 'get',
    params: data
  })
}

//抵押办理
export function createPledge(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'pledge/createPledge',
    method: 'post',
    data: data
  })
}

//解押验证码
export function getPhoneCodes(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/pledge/getPhoneCode',
    method: 'post',
    data: data
  })
}

//抵押文件上传
export function uploadFile(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'pledge/uploadFile',
    method: 'post',
    data: data
  })
}

//授信信息回填接口
export function getBizApproveInfo(data) {
  return request({
    headers: {
      // 'Content-Type':'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApproveInfo/getBizApproveInfo',
    method: 'post',
    params: data
  })
}

//安信魔方
export function axcubeList(data) {
  return request({
    headers: {
      // 'Content-Type':'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'ax-cube/list',
    method: 'get',
    params: data
  })
}

//解押
export function disablePledge(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'pledge/disablePledge',
    method: 'post',
    data: data
  })
}

//分发
export function distribute(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'assistant/user/distribute',
    method: 'post',
    data: data
  })
}

//抵押订单
export function pledgeList(data) {
  return request({
    headers: {
      // 'Content-Type':'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApplyInfo/pledgeList',
    method: 'get',
    params: data
  })
}

//担保列表
export function guaranteeList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApplyInfo/guaranteeList',
    method: 'get',
    params: data
  })
}

//保险列表
export function insuranceList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/biz/insurance/list',
    method: 'get',
    params: data
  })
}

//保险详情列表
export function insuranceDetail(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/biz/insurance/detail',
    method: 'get',
    params: data
  })
}

//保理列表
export function factoringList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/biz/factoring/list',
    method: 'get',
    params: data
  })
}

//保理详情列表
export function factoringDetail(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/biz/factoring/detail',
    method: 'get',
    params: data
  })
}

//续贷列表
export function bizRenewLoanInfoList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/biz/bizRenewLoanInfo/list',
    method: 'get',
    params: data
  })
}

//还款
export function insertRepaymentInfo(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizLoanInfo/insertRepaymentInfo',
    method: 'post',
    data: data
  })
}

//担保申请
export function applyGuarantee(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'guarantee/applyGuarantee',
    method: 'post',
    data: data
  })
}

//担保机构列表
export function getGuaranteeCom(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'guarantee/getGuaranteeCom',
    method: 'post',
    // params: data
  })
}

//综合授信列表新增
export function insertApproveDetail(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApproveDetail/insertApproveDetail',
    method: 'post',
    data: data
  })
}

//综合授信列表
export function getApproveInfo(data) {
  return request({
    headers: {
      // 'Content-Type':'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApplyInfo/getApproveInfo',
    method: 'get',
    params: data
  })
}

//获取统计报表中的机构（下一级机构）
export function deptList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'system/dept/deptList',
    method: 'post',
    data: data
  })
}

//综合授信删除
export function approveDetailId(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizApproveDetail/deleteApproveDetail',
    method: 'post',
    data: data
  })
}
//机构统计
export function getNumericalStatement(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'statistics/bizApplyInfo/getNumericalStatement',
    method: 'post',
    data: data
  })
}
//农商行业务统计
export function ruralBankStatistics(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/statistics/bizApplyInfo/ruralBankStatistics',
    method: 'post',
    data: data
  })
}
//客户经理统计
export function getNumericalStatementByCustome(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'statistics/bizApplyInfo/getNumericalStatementByCustome',
    method: 'post',
    data: data
  })
}

//客户经理查询
export function selectCustomer(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'system/user/selectCustomer',
    method: 'get',
    data: data
  })
}



//获取产品复选框信息
export function productGetList(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'financeProduct/product/getList',
    method: 'post',
    data: data
  })
}

//产品统计
export function productStatistics(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'statistics/bizApplyInfo/productStatistics',
    method: 'post',
    data: data
  })
}

//产品统计 产品类别分析
export function productStatisticsGuaranteeType(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'statistics/bizApplyInfo/productStatisticsGuaranteeType',
    method: 'post',
    data: data
  })
}

//产品统计 单一产品分析
export function productStatisticsByProduct(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'statistics/bizApplyInfo/productStatisticsByProduct',
    method: 'post',
    data: data
  })
}

//回收
export function backApply(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'distribute/bizFlowInfo/backApply',
    method: 'post',
    data: data
  })
}

//回收
export function getBackApply(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'distribute/bizFlowInfo/getBackApply',
    method: 'post',
    data: data
  })
}

//分配
export function distributeApply(data) {
  return request({
    headers: {
      // 'Content-Type':'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'distribute/bizFlowInfo/distributeApply',
    method: 'post',
    data: data
  })
}

//进度条
export function getRecordList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'distribute/bizFlowInfo/getRecordList',
    method: 'get',
    params: data
  })
}

//获取手机验证码
export function getPhoneCode(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
    url: 'getPhoneCode',
    method: 'post',
    data: data
  })
}

//找回密码
export function forgetPSW(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
    url: 'forgetPSW',
    method: 'post',
    data: data
  })
}


//模板下载
export function downLoadExampel(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'assistant/bizMarketInfo/importTemplate',
    method: 'get',
    // params: data
  })
}

//用户树
export function deptUserList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'system/dept/deptUserList',
    method: 'get',
    // params: data
  })
}

//字典
export function dictType(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'system/dict/data/type/' + data,
    method: 'get',
    // params: data
  })
}

//首页_顶部信息
export function monthResult() {
  return request({
    url: 'homePage/monthResult',
    method: 'get',
  })
}

//首页_底部信息
export function statistic(data) {
  return request({
    url: 'homePage/statistic',
    method: 'get',
    params: data
  })
}

//营销名单_列表
export function bizMarketInfoList(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'assistant/bizMarketInfo/list',
    method: 'get',
    params: data
  })
}

//营销名单_详情
export function bizMarketInfo(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: 'assistant/bizMarketInfo/' + data,
    method: 'get',
    // params: data
  })
}

//贷后管理_未结清放款信息列表
export function unsettledloanList(data) {
  return request({
    url: 'afterloan/unsettledloan/list',
    method: 'get',
    params: data
  })
}

//贷后管理_全部放款信息列表
export function allloanList(data) {
  return request({
    url: 'afterloan/allloan/list',
    method: 'get',
    params: data
  })
}

//贷后管理_未到期授信列表
export function unexpiredapproveList(data) {
  return request({
    url: 'afterloan/unexpiredapprove/list',
    method: 'get',
    params: data
  })
}

//贷后管理_全部授信列表
export function allapproveList(data) {
  return request({
    url: 'afterloan/allapprove/list',
    method: 'get',
    params: data
  })
}

//贷后管理_客户详情
export function customerInfo(data) {
  return request({
    url: 'afterloan/customer/' + data,
    method: 'get'
  })
}

//贷后管理_客户列表
export function customerList(data) {
  return request({
    url: 'afterloan/customer/list',
    method: 'get',
    params: data
  })
}

//待放款_新增放款
export function insertLoanInfo(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: 'business/bizLoanInfo/insertLoanInfo',
    method: 'post',
    data: data
  })
}

//待放款订单列表
export function bizLoanInfo(data) {
  return request({
    url: 'business/bizApplyInfo/loanList',
    method: 'get',
    params: data
  })
}

//待授信订单列表
export function approveList(data) {
  return request({
    url: 'business/bizApplyInfo/approveList',
    method: 'get',
    params: data
  })
}

//需求信息
export function bizAllApply(data) {
  return request({
    url: 'business/BizAllApply/list',
    method: 'get',
    params: data
  })
}

//详情
export function getBizApplyInfo(data) {
  return request({
    url: 'business/bizApplyInfo/getBizApplyInfo',
    method: 'get',
    params: data
  })
}

//担保详情
export function guaranteeDetail(data) {
  return request({
    url: '/guarantee/detail',
    method: 'post',
    params: data
  })
}

//企业基本信息
export function getCustomerDetail(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
    url: 'distribute/bizFlowInfo/getCustomerDetail',
    method: 'post',
    data: data
  })
}

//需求信息
export function bizApplyInfo(id) {
  return request({
    url: '/business/bizApplyInfo/' + id,
    method: 'get',
  })
}

//获取行业
export function getWork() {
  return request({
    url: '/SysDicDataBus/list',
    method: 'get',
    // data: data
  })
}

//获取区域
export function getArea() {
  return request({
    url: '/area/list',
    method: 'get',
    // data: data
  })
}

//待办任务
export function taskAgent() {
  return request({
    url: '/homePage/taskAgent',
    method: 'get',
    // data: data
  })
}

// 查询用户列表
export function checkIn(data) {
  return request({
    headers: {
      // 'Content-Type':'application/json',
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
      // 'Authorization': "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjNlMTVkMDgwLTA0NzQtNDFhMy1hYTZkLTBjNmNjMTBkOTA5MSJ9.pHnmwp-ZUZcqOjUJXAp44kkGCjXBl4K4Ze_YM81-kkWmytXuUHvMXyPNtDqk-8ep8A_2Fi80qRMvG66VdWsI6g"
      //'Authorization': "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI4NDlhNGIwLWFjNGQtNDUwNy04Nzg0LWQ3NDc1ZjA5MGM2MyJ9.bUlXK389N8YZgllSr2sU-uvMvENLuoWC1HGZOqYpvhNn45eZ-KlRenIMhF1tYZaydhIna5zh7sgKU0zwleb13w"
    },
    url: '/business/bizApplyInfo/checkIn?reqId=' + data,
    method: 'post',
    // data: data
  })
}

// 需求抢单  批量抢单
export function moreCheckIn(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/business/bizApplyInfo/moreCheckIn?reqIds=' + data,
    method: 'post',
    // data: data
  })
}

// 获取安信图谱跳转参数列表和地址
export function redirect(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/platform-biz/common/graph-redirect?entName=' + data,
    method: 'get',
    //data: data
  })
}

// 信用分跳转地址接口
export function axScoreRedirect(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/platform-biz/common/ax-score-redirect',
    method: 'get',
    //data: data
  })
}

// 黑名单
export function redireblackNameListct(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/platform-biz/common/black-name-list/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 基本信息
export function jbxx(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/jbxx?entName=' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 股东及出资登记
export function gdjczdj(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/gdjczdj/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 高管信息
export function zyry(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/zyry/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 变更信息
export function jbxxbg(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/jbxxbg/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 经营异常
export function jyyc(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/jyyc/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 行政处罚 
export function xzcf(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/xzcf/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 行政许可 
export function xzxk(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/xzxk/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 对外投资 
export function dwtz(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/dwtz/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 股权出质登记 
export function gqczdj(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/gqczdj/' + data,
    method: 'get',
    //data: data
  })
}

// 安信魔方 动产抵押登记 
export function dcdydj(data) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': getToken()
    },
    url: '/ax-cube/dcdydj/' + data,
    method: 'get',
    //data: data
  })
}

// 待审核订单列表
export function bizFlowInfo(query) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
    url: '/business/bizApplyInfo/auditingList',
    method: 'get',
    params: query
  })
}

//审核
export function auditing(data) {
  return request({
    url: 'distribute/bizFlowInfo/auditing',
    method: 'post',
    data: data
  })
}

//查询token
export function getEncryptValue(data, code) {
  return request({
    url: 'loginWithoutCaptcha/' + data + '/' + code,
    method: 'post',
    // data: data
  })
}

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/business/bizApplyInfo/list',
    method: 'get',
    params: query
  })
}

// 用户名单
export function userList(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getUser(userId) {
  return request({
    url: '/system/user/' + praseStrEmpty(userId),
    method: 'get'
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/system/user',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/system/user',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delUser(userId) {
  return request({
    url: '/system/user/' + userId,
    method: 'delete'
  })
}

// 导出用户
export function exportUser(query) {
  return request({
    url: '/system/user/export',
    method: 'get',
    params: query
  })
}

// 用户密码重置
export function resetUserPwd(userId, password) {
  const data = {
    userId,
    password
  }
  return request({
    url: '/system/user/resetPwd',
    method: 'put',
    data: data
  })
}

// 用户状态修改
export function changeUserStatus(userId, status) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/system/user/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询用户个人信息
export function getUserProfile() {
  return request({
    url: '/system/user/profile',
    method: 'get'
  })
}

// 修改用户个人信息
export function updateUserProfile(data) {
  return request({
    url: '/system/user/profile',
    method: 'put',
    data: data
  })
}

// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
  const data = {
    oldPassword,
    newPassword
  }
  return request({
    url: '/system/user/profile/updatePwd',
    method: 'put',
    params: data
  })
}

// 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/system/user/profile/avatar',
    method: 'post',
    data: data
  })
}

// 学员模板导出
export function templateExport(data) {
  return request({
    headers: {
      'Authorization': getToken()
    },
    url: '/student/templateExport',
    method: 'get',
    responseType: 'blob',
    params: data
  })
}

// 下载用户导入模板
export function importTemplate() {
  return request({
    url: '/system/user/importTemplate',
    method: 'get'
  })
}

// 视频排序
export function videoSort(data) {
  return request({
    url: '/video',
    method: 'put',
    data: data
  })
}

//视频播放列表
export function videoDetail(id) {
  return request({
    url: '/video/play/list?userId=' + id,
    method: 'get',
  })
}

//视频播放小练习预览
export function testDetail(id) {
  return request({
    url: '/video/play/preview/' + id,
    method: 'get',
  })
}

//视频播放小练习预览
export function binding(data) {
  return request({
    url: '/video/binding',
    method: 'put',
    data: data
  })
}

//商品列表
export function getGoodsList(data) {
  return request({
    url: '/goods/list',
    method: 'get',
    params: data
  })
}

//班级赠送商品
export function presentCourse(data) {
  return request({
    url: '/class/presentCourse',
    method: 'put',
    data: data
  })
}
//商品赠送班级的班级详情列表
export function presentGoodsList(data) {
  return request({
    url: '/goods/presentGoods/' + data,
    method: 'get'
  })
}

//商品赠送班级
export function presentGoods(data) {
  return request({
    url: '/goods/presentGoods',
    method: 'put',
    data: data
  })
}

// 商品新增
export function addGoods(data) {
  return request({
    url: '/goods',
    method: 'post',
    data: data
  })
}

// 商品删除
export function goodDel(id) {
  return request({
    url: '/goods/' + id,
    method: 'delete',
  })
}

// 商品详情
export function detailGoods(id) {
  return request({
    url: '/goods/' + id,
    method: 'get',
  })
}

// 商品试学
export function tryLearn(data) {
  return request({
    url: '/goods/tryLearn',
    method: 'put',
    data: data
  })
}

// 商品试学详情
export function tryLearnDetail(id) {
  return request({
    url: '/goods/tryLearn/' + id,
    method: 'get',
  })
}

// 商品编辑
export function editGoods(data) {
  return request({
    url: '/goods',
    method: 'put',
    data: data
  })
}

// 实操考点新增
export function operationAdd(data) {
  return request({
    url: '/practical/test',
    method: 'post',
    data: data
  })
}

// 实操考点列表
export function getOperationList(data) {
  return request({
    url: '/practical/test/list',
    method: 'get',
    params: data
  })
}

// 实操考点删除
export function operationDel(id) {
  return request({
    url: '/practical/test/' + id,
    method: 'delete',
  })
}

// 实操考点详情
export function operationDetail(id) {
  return request({
    url: '/practical/test/' + id,
    method: 'get',
  })
}

// 实操考点修改
export function operationEdit(data) {
  return request({
    url: '/practical/test/',
    method: 'put',
    data: data
  })
}

// 订单列表
export function getOrderList(data) {
  return request({
    url: '/order/list/',
    method: 'get',
    params: data
  })
}

// 商品扩展属性列表
export function getTreeList(data) {
  return request({
    url: '/goods/extendList',
    method: 'get',
    params: data
  })
}

// 视频文件夹列表
export function getFileList(data) {
  return request({
    url: '/video/folder/list',
    method: 'get',
    params: data
  })
}


// 视频修改
export function videoPut(data) {
  return request({
    url: '/video',
    method: 'put',
    data: data
  })
}


// 视频文件夹详情
export function getFileDetail(data) {
  return request({
    url: '/video/folder/' + data.id,
    method: 'get',
  })
}

// 视频文件夹修改
export function getFileEdit(data) {
  return request({
    url: '/video/folder',
    method: 'put',
    data: data
  })
}

// 视频文件夹新增
export function getFileAdd(data) {
  return request({
    url: '/video/folder',
    method: 'post',
    data: data
  })
}

// 视频文件夹删除
export function getFileDel(data) {
  return request({
    url: '/video/folder/' + data,
    method: 'delete',
  })
}

// 预约列表
export function subscribeList(data) {
  return request({
    url: '/subscribe/list/',
    method: 'get',
    params: data
  })
}


// 问题列表
export function problemList(data) {
  return request({
    url: '/problem/list/',
    method: 'get',
    params: data
  })
}


export function teacherList(data) {
  return request({
    url: '/teacher/list',
    method: 'get',
    params: data
  })
}


// 讲师新增
export function addTeacher(data) {
  return request({
    url: '/teacher',
    method: 'post',
    data: data
  })
}

// 讲师修改
export function editTeacher(data) {
  return request({
    url: '/teacher',
    method: 'put',
    data: data
  })
}

export function teacherDel(id) {
  return request({
    url: 'teacher/' + id,
    method: 'DELETE',
  })
}


export function classPresentGoods(id) {
  return request({
    url: '/goods/classPresentGoods/' + id,
    method: 'put',
  })
}